package b4;

public class SStudent extends Student {
    String parents_name;
    String sname;

    public SStudent(String sid, String sname, int sage) {
        super(sid, sname, sage);
        System.out.println("SStudent constructor");
        System.out.println("name: " + super.sname);
        System.out.println("name: " + this.sname);
    }

//    @Override
//    public String toString() {
//        return "小学生 {" +
//                "sid='" + sid + '\'' +
//                ", sname='" + sname + '\'' +
//                ", sage=" + sage +
//                '}';
//    }

    @Override
    public String toString() {
        return "SStudent{" +
                "sid='" + sid + '\'' +
                ", sname='" + sname + '\'' +
                ", sage=" + sage +
                '}';
    }
}
